package com.cloudalibabaconsumer8084.Service;

import com.cloudalibabacomment8001.entity.JsonResult;
import com.cloudalibabaconsumer8084.Service.impl.FeignServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Description: TODO
 * @Author zx
 * @Date 2024/11/27 20:05
 * @Version 1.0
 */


@Service
// 当没有成功调用提供者时，会调用FeignServiceImpl的fallback方法
@FeignClient(value = "nacos-provider", fallback = FeignServiceImpl.class)
public interface FeignService {

    @GetMapping("info/{id}")
    public JsonResult<String> msbSql(@PathVariable("id") Long id);

}
